package com.md24housecall.adapter;

import java.util.List;

import android.annotation.SuppressLint;
import android.content.Context;
import android.text.format.DateFormat;

import com.md24housecall.model.IHealthDataList;


public class WeightAdapter extends BaseIHealthAdapter{

	public WeightAdapter(Context context,List<IHealthDataList>listData){
		mContext=context;
		listBpData=listData;
	}
	
	@SuppressLint("DefaultLocale")
	@Override
	public void fillData(ViewHolder viewHolder,int position) {
		// TODO Auto-generated method stub
		IHealthDataList weightDataList=listBpData.get(position);
//		MyLog.d(GlobalConstant.TAG,"weightDataList.getBMI(): "+weightDataList.getBMI());
		viewHolder.txvColumn1.setText(""+String.format("%.1f",weightDataList.getWeightValue()));
		viewHolder.txvColumn2.setText(""+String.format("%.1f",weightDataList.getBMI()));
	    calendar.setTimeInMillis(weightDataList.getDate()*1000);
	    String date = DateFormat.format(TIMEFORMAT, calendar).toString();
		viewHolder.txvDate.setText(date.toUpperCase());
	}
	
}